package com.victor.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.victor.dao.MessageboardDao;
import com.victor.entity.Messageboard;
import com.victor.service.MessageboardService;

@Service
public class MessageboardServiceimpl implements MessageboardService {

	@Autowired
	private MessageboardDao dao;

	// 新建留言
	@Override
	public boolean build(Messageboard messageboard) {
		return dao.build(messageboard) > 0 ? true : false;
	}

	// 查询所有留言
	@Override
	public List<Messageboard> getAll() {
		return dao.getAll();
	}

	// 批量删除留言
	@Override
	public boolean batchDelete(int[] ids) {
		return dao.batchDelete(ids);
	}
}
